package cn.jluzh.blog.mapper;

import cn.jluzh.blog.modules.security.eneity.SysUserToken;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

/**
 * @author hzhii
 */
@Repository
public interface SysUserTokenMapper extends BaseMapper<SysUserToken> {

    /**
     * token更新
     * @param userId 用户的ID
     * @param token
     * */
    @Update("update sys_user_token set token = #{token} where user_id = #{userId}")
    void updateToken(@Param("userId") Integer userId, @Param("token") String token);
}
